
PACKAGE=ornagai-stardict
NAME=ornagai
DATA_DIR = /usr/share/
DEP_PACKAGE_DIR = /usr/share/stardict/dic/
DOC_DIR = /usr/share/doc/

all:

install: make-install-dirs
	install ornagai/ornagai.dict $(DESTDIR)$(DEP_PACKAGE_DIR)$(NAME)
	install ornagai/ornagai.idx $(DESTDIR)$(DEP_PACKAGE_DIR)$(NAME)
	install ornagai/ornagai.ifo $(DESTDIR)$(DEP_PACKAGE_DIR)$(NAME)
	install AUTHORS $(DESTDIR)$(DATA_DIR)$(PACKAGE)
	install COPYING $(DESTDIR)$(DATA_DIR)$(PACKAGE)    

make-install-dirs:
	mkdir -p $(DESTDIR)$(DEP_PACKAGE_DIR)$(NAME)
	mkdir -p $(DESTDIR)$(DATA_DIR)$(PACKAGE)
	mkdir -p $(DESTDIR)$(DOC_DIR)$(PACKAGE)                

uninstall:
	rm -rf $(DESTDIR)$(DEP_PACKAGE_DIR)$(NAME)
	rm -rf $(DESTDIR)$(DATA_DIR)$(PACKAGE)
	rm -rf $(DESTDIR)$(DOC_DIR)$(PACKAGE)
        
clean:
	rm -f *-stamp
	rm -rf debian/$(PACKAGE)
	rm -f debian/files
	find . -type f -iregex '.*~$$'  -print | xargs rm -rf
	find . -type f -iregex '.*\.bak$$'  -print | xargs rm -rf

.PHONY: all install clean distclean
